import fetch from '@/utils/request'

export function page(obj) {
  const data = obj
  return fetch({
    url: '/api/adminCrm/merchantBase/queryList',
    method: 'post',
    data: data
  })
}

export function getObj(id) {
  return fetch({
    url: '/api/adminCrm/merchantBase/' + id,
    method: 'get'
  })
}
export function getObjByMerchantId(merchantId) {
  return fetch({
    url: '/api/adminCrm/merchantBase/info/' + merchantId,
    method: 'get'
  })
}

export function addObj(obj) {
  return fetch({
    url: '/api/adminCrm/merchantBase/add',
    method: 'post',
    data: obj
  })
}

export function putObj(id, obj) {
  return fetch({
    url: '/api/adminCrm/merchantBase/' + id,
    method: 'put',
    data: obj
  })
}

export function delObj(id) {
  return fetch({
    url: '/api/adminCrm/merchantBase/deleteOne/' + id,
    method: 'get'
  })
}

export function queryCustInfoAndAccountInfo(merchantId) {
  return fetch({
    url: '/api/adminCrm/customerBase//queryCustInfoAndAccountInfo/' + merchantId,
    method: 'get'
  })
}
